import request from '@/router/axios';

// 加工计划列表
export const getRequirePlanList = (factoryName,current, size, params) => {
  return request({
    url: '/api/blade-portal/oemplan/list',
    method: 'get',
    params: {
      ...params,
      current,
      size,
      factoryName
    }
  })
}

export const detail = (planNo) => {
  return request({
    url: '/api/blade-portal/oemplan/listCountMaterial',
    method: 'get',
    params: {
      planNo
    }
  })
}

//详细
// export const getDetailsInfo = (id) => {
//   return request({
//     url: '/api/blade-portal/requireplan/detail',
//     method: 'get',
//     params: {
//       id
//     }
//   })
// }

// 受理/拒绝
export const deal = (ids,state,msg) => {
  return request({
    url: '/api/blade-portal/oemplan/deal',
    method: 'post',
    params: {
      ids,
      state,
      msg
    }
  })
}

//详细
export const generateInvoice = (ids,estimatedArrivalTime,remark,sendTime,supplyNo,transportModel) => {
  return request({
    url: '/api/blade-portal/oemplan/generateInvoice',
    method: 'get',
    params: {
      ids,
      estimatedArrivalTime,
      remark,
      sendTime,
      supplyNo,
      transportModel,
    }
  })
}
